package com.huaguoguo.spring.context.config;

public class BeanDefinition {

    protected String beanName;

    protected Class<?> beanType;


    public Object newInstance() throws Exception {
        return beanType.newInstance();
    }


    public String getBeanName() {
        return beanName;
    }

    public void setBeanName(String beanName) {
        this.beanName = beanName;
    }

    public Class<?> getBeanType() {
        return beanType;
    }

    public void setBeanType(Class<?> beanType) {
        this.beanType = beanType;
    }

    @Override
    public String toString() {
        return "BeanDefinition{" +
                "beanName='" + beanName + '\'' +
                ", beanType=" + beanType +
                '}';
    }
}
